﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes {
    import __AS3__.vec.*;

    public class WorkersDefinition {

        private var m_type:String;
        private var m_cashCost:int;
        private var m_members:Vector.<WorkerDefinition>;
        private var m_amount:int;

        public function WorkersDefinition(){
            this.m_type = null;
            this.m_cashCost = 0;
            this.m_members = new Vector.<WorkerDefinition>();
        }
        public function get type():String{
            return (this.m_type);
        }
        public function get cashCost():int{
            return (this.m_cashCost);
        }
        public function get members():Vector.<WorkerDefinition>{
            return (this.m_members);
        }
        public function get amount():int{
            return (this.m_amount);
        }
        public function loadObject(_arg1:XML):void{
            var _local2:XML;
            var _local3:WorkerDefinition;
            this.m_type = _arg1.@type;
            this.m_cashCost = int(_arg1.@cashCost);
            this.m_amount = int(_arg1.@amount);
            for each (_local2 in _arg1.worker) {
                _local3 = new WorkerDefinition();
                _local3.loadObject(_local2);
                this.m_members.push(_local3);
            };
            if (this.m_amount == 0){
                this.m_amount = this.m_members.length;
            };
        }

    }
}//package Classes 
